﻿<%@ Page Title="CUPS Manage Properties" Language="vb" AutoEventWireup="false" MasterPageFile="~/Content/Site.Master" CodeBehind="client_property.aspx.vb" Inherits="CupsApp.Web.Form.client_property" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">




<div class="Content">
  <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource2" 
        Width="100%"> 
        <ItemTemplate >
        <b>Landlord:</b><i> <%# Eval("Name") %></i><br />
        <b>Phone No:</b> <i><%# Eval("Phone") %></i><br />
        <b>Company Name:</b> <i><%# Eval("CompanyName") %></i><br />
        <b>Notes:</b> <i><%# Eval("Notes") %></i><br />
        </ItemTemplate>   
  </asp:FormView>
   <asp:FormView ID="FormView2" runat="server" DataSourceID="ObjectDataSource3" 
        Width="100%"> 
        <ItemTemplate >
        <b>Address: </b><i><%#Eval("Address")%></i><br />
        <b>City: </b><i><%#Eval("City")%></i><br />
        <b>PostalCode: </b><i><%#Eval("PostalCode")%></i><br />
        <b>Suite: </b><i><%#Eval("Suite")%></i><br />
        </ItemTemplate>   
  </asp:FormView>
  <div class="FullRow1">
     <hr/>
     <center><asp:Button ID="btnBack" runat="server" Text="Back" Width="83px" CausesValidation="false" /></center>
  </div>
  <br />
  <div class="FullRow1">
     <div class="FormHeading">
            <strong><asp:Label ID="lblFirstLanguage" runat="server" Text="PROPERTY CLIENT HISTORY"></asp:Label></strong>
    </div>
  </div> 
   
  <div class="FullRow2"> 
  <div class="filler"></div><div class="filler"></div>
     <asp:GridView ID="gvProperties" runat="server" AutoGenerateColumns="False" 
          DataSourceID="ObjectDataSource1" AllowPaging="True" AllowSorting="False" width = "99%">
          <RowStyle HorizontalAlign="Left" />
          <Columns>
              <asp:BoundField DataField="ID" HeaderText="Client ID" SortExpression="ID"  />
              <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name"  />
              <asp:BoundField DataField="FromDate" HeaderText="FromDate" 
                  SortExpression="FromDate" />
              <asp:BoundField DataField="ToDate" HeaderText="ToDate" 
                  SortExpression="ToDate" />
               <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="~/Forms/personal.aspx?clientID={0}" 
                    Text="Go To Client Details" />
          </Columns>
      
          <HeaderStyle Font-Bold="False" HorizontalAlign="Center" />
          <EditRowStyle HorizontalAlign="Left" />
      
          <AlternatingRowStyle BackColor="#F8F8F8" />
      
      </asp:GridView>
      
  <div class="filler"></div><div class="filler"></div>
  </div>
               

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetClientsForProperty" TypeName="CupsApp.Service.CupsDomainService">
    <SelectParameters>
            <asp:QueryStringParameter Name="PropertyID" QueryStringField="PropertyID" Type="Int32"  />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        SelectMethod="GetLandlord" TypeName="CupsApp.Service.CupsDomainService">
    <SelectParameters>
            <asp:QueryStringParameter Name="LandlordID" QueryStringField="LandlordID" Type="Int32"  />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
        SelectMethod="GetPropertyForEdit" TypeName="CupsApp.Service.CupsDomainService">
    <SelectParameters>
            <asp:QueryStringParameter Name="PropertyID" QueryStringField="PropertyID" Type="Int32"  />
    </SelectParameters>
</asp:ObjectDataSource>
    </div>
</asp:Content>

